package com.tobeface.wechat.showcase.handler;

import com.google.common.base.Objects;
import com.tobeface.wechat.message.WeChatMessage;
import com.tobeface.wechat.message.WeChatMessageChannel;
import com.tobeface.wechat.message.handler.EventMessageHandlerSupport;

/**
 * @author loudyn
 */
public class UnsubscribeEventMessageHandler extends EventMessageHandlerSupport {

    @Override
    protected boolean isEventMessageSupport(WeChatMessage message, String event) {
        return Objects.equal("unsubscribe", event);
    }

    @Override
    protected void onEventMessageReceived(WeChatMessageChannel channel, WeChatMessage message, String event) {
        getLogger().warn("用户取消了关注");
    }
}
